home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
COMM
/
AM120.ARJ
/
AMDIAL.SCR
< prev
next >
Wrap
Text File
|
1991-02-15
|
7KB
|
310 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; AMDial Automated Dialing Script Qmodem 4.XX & AutoMate ;;;
;;; By Marc S. Hedish, ABSOLUT(e)LY TEMPORARY (702) 254-8601 ;;;
;;; (C) Copyright 1991 Marc S. Hedish - All Rights Reserved ;;;
;;; Version 1.2 - 02/15/91 - Production Release ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Graphics ANSI
TurnOn 8_BIT
TurnOff ECHO PRINT SPLIT BS_DEL LINEFEED NOISE MUSIC
String STATUS OLDATTR TEMP COUNT WAITTIME CALL LINE TRIES PWORD CONF NAME X DN FIRST
String QWKFILE REPFILE PROT DOORNUM CMDFILE CMD FILENAME DESCRIPTION CHECK REP TYPE
String STARTTIME STARTDATE NOW ENDTIME T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 LANG UP PROMPT
GoTo Start
ShiftUp:
Assign 9 "$8"
Assign 8 "$7"
Assign 7 "$6"
Assign 6 "$5"
Assign 5 "$4"
Assign 4 "$3"
Assign 3 "$2"
Assign 2 "$1"
Assign 1 "$0"
Assign 0 ""
Return
ShiftDown:
Assign 0 "$1"
Assign 1 "$2"
Assign 2 "$3"
Assign 3 "$4"
Assign 4 "$5"
Assign 5 "$6"
Assign 6 "$7"
Assign 7 "$8"
Assign 8 "$9"
Assign 9 ""
Return
ShiftDownT:
Assign TEMP "$T0"
Assign T0 "$T1"
Assign T1 "$T2"
Assign T2 "$T3"
Assign T3 "$T4"
Assign T4 "$T5"
Assign T5 "$T6"
Assign T6 "$T7"
Assign T7 "$T8"
Assign T8 "$T9"
Assign T9 "$TEMP"
Return
Cycle:
Assign TEMP "$0"
Gosub ShiftDown
Assign 9 "$TEMP"
Gosub ShiftDownT
Incr LINE
If $LINE > 14 Cycle1
Return
Cycle1:
Assign LINE 5
Abort:
Return
Error:
Delay 5000
AtWrite 09 15 031 " "
Return
Start:
Assign OLDATTR $ATTR
GetScr
Color 127
Window 01 01 80 18
ClrScr
Color 031
Box 07 02 74 16
ClrScr
AtWrite 30 02 030 " AMDial Status Window "
AtWrite 61 16 030 " Version 1.2 "
AtWrite 09 03 023 "Dialing Queue"
AtWrite 09 04 023 "───────────────────────────"
AtWrite 38 03 023 "Status"
AtWrite 38 04 023 "──────────────"
AtWrite 54 03 023 "Dialed"
AtWrite 54 04 023 "────────"
AtWrite 64 03 023 "Connected"
AtWrite 64 04 023 "─────────"
AtWrite 75 03 007 "░░"
AtWrite 75 04 007 "░░"
AtWrite 75 05 007 "░░"
AtWrite 75 06 007 "░░"
AtWrite 75 07 007 "░░"
AtWrite 75 08 007 "░░"
AtWrite 75 09 007 "░░"
AtWrite 75 10 007 "░░"
AtWrite 75 11 007 "░░"
AtWrite 75 12 007 "░░"
AtWrite 75 13 007 "░░"
AtWrite 75 14 007 "░░"
AtWrite 75 15 007 "░░"
AtWrite 75 16 007 "░░"
AtWrite 09 17 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
AtWrite 43 17 007 "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
Setup:
When
If "$0" <> "" CheckParams
Exist $SCPATHAMDIAL.DAT LoadFile
AtWrite 10 15 252 " No configuration file or passed parameters. Nothing to do. "
Stamp No configuration file. No parameters passed. Nothing to do.
NoParams:
Inkey Temp
Color $OLDATTR
Window 01 01 $LAST_COL $LAST_ROW
Exit
LoadFile:
AtWrite 17 15 031 "Configuration file found. Loading configuration."
OpenFile $SCPATHAMDIAL.DAT Read
Assign COUNT 0
Loop1:
ReadFile TEMP
If "$TEMP" = "_EOF_" Close
Assign $COUNT "$TEMP"
Incr COUNT
If "$COUNT" < 10 Loop1
Close:
CloseFile
CheckParams:
AtWrite 17 15 031 " Verifying Parameters "
Loop5:
If "$9" <> "" CheckEndTime
Gosub ShiftUp
GoTo Loop5
CheckEndTime:
Assign ENDTIME 24:00:00
If "$9" < "00:00:00" ResetParams
If "$9" > "23:59:59" ResetParams
Assign ENDTIME $9
Assign 9 ""
ResetParams:
If "$0" <> "" CheckWaitTime
Gosub ShiftDown
GoTo ResetParams
CheckWaitTime:
Assign WAITTIME NOW
If "$0" < "00:00:00" RepCheck
If "$0" > "23:59:59" RepCheck
Assign WAITTIME $0
Gosub ShiftDown
RepCheck:
If "$0" <> "Replies" PrepQueue
Gosub ShiftDown
Exist $ULPATH*.REP Yes
GoTo NoneToSend
Yes:
DOS "DIR $ULPATH*.REP > $SCPATH{AMDIAL}.DIR"
OpenFile $SCPATH{AMDIAL}.DIR Read
ReadFile REP
Loop4:
ReadFile REP
If "$REP" <> "" Loop4
Assign COUNT 0
Loop2:
ReadFile REP
If "$REP" < "!" CloseDir
Gosub ShiftUp
Assign TEMP $REP
Assign 0 $TEMP.REP
Incr COUNT
If $COUNT < 9 Loop2
CloseDir:
CloseFile
DOS "ERASE $SCPATH{AMDIAL}.DIR"
GoTo PrepQueue
NoneToSend:
Gosub ShiftDown
If "$0" <> "" PrepQueue
AtWrite 10 15 252 " No reply packets found in upload directory. Nothing to do. "
Stamp No reply packets found in upload directory. Nothing to do.
GoTo NoParams
PrepQueue:
Assign COUNT 0
Loop3:
Assign T$COUNT 0
Incr COUNT
If $COUNT < 9 Loop3
ShowQueue:
Window 09 05 55 15
Send "ATV0^M"
WaitFor "0"
ClrScr
DisplayLn " 1 - $0"
DisplayLn " 2 - $1"
DisplayLn " 3 - $2"
DisplayLn " 4 - $3"
DisplayLn " 5 - $4"
DisplayLn " 6 - $5"
DisplayLn " 7 - $6"
DisplayLn " 8 - $7"
DisplayLn " 9 - $8"
Display "10 - $9"
Queue:
Window 38 05 46 16
GoToXY 01 01
If "$0" = "" Wait
DisplayLn "In Queue"
If "$1" = "" Wait
DisplayLn "In Queue"
If "$2" = "" Wait
DisplayLn "In Queue"
If "$3" = "" Wait
DisplayLn "In Queue"
If "$4" = "" Wait
DisplayLn "In Queue"
If "$5" = "" Wait
DisplayLn "In Queue"
If "$6" = "" Wait
DisplayLn "In Queue"
If "$7" = "" Wait
DisplayLn "In Queue"
If "$8" = "" Wait
DisplayLn "In Queue"
If "$9" = "" Wait
Display "In Queue"
Wait:
Assign LINE 5
If "$WAITTIME" = "NOW" Go
Window 18 14 63 15
WaitUntil $WAITTIME
Assign WAITTIME NOW
ClrScr
Go:
Color $OLDATTR
Window 01 17 $LAST_COL $LAST_ROW
Assign StartDate $DATE
Assign StartTime $TIME
Loop8:
AtWrite 13 $LINE 159 "√"
Incr T0
If $T0 > 200 AbortDial
Assign Now $TIME
If $StartTime <= $EndTime Loop6
If $Date = $StartDate Loop7
Assign StartTime 00:00:00
Loop6:
If $Now >= $EndTime AbortTime
Loop7:
AtWrite 38 $LINE 031 "Attempts - $T0 "
AtWrite 54 $LINE 031 "$TIME"
Assign X $TIME
Dial "T$0"
If "$X" = "$TIME" NoSuchNumber
If $OFFLINE DialNext
AtWrite 14 $LINE 031 "$BOARD"
AtWrite 36 $LINE 031 " Connect "
AtWrite 64 $LINE 031 "$TIME"
Stamp Connected after $T0 attempts.
Assign STATUS AMDIAL
Assign 0 $STATUS
Script AutoMate
If "$STATUS" = "BOMB" BadReturn
If "$0" = "AutoMate" GoodReturn
AtWrite 38 $LINE 016 "$0"
AtWrite 12 15 252 " Error while returning from AutoMate. "
Gosub Error
Assign 0 ""
DialNext:
AtWrite 13 $LINE 031 " "
If "$0$1$2$3$4$5$6$7$8$9" = "" Done
Loop9:
Gosub Cycle
If "$0" = "" Loop9
GoTo Loop8
BadReturn:
AtWrite 38 $LINE 031 "Offline Error "
Assign 0 ""
GoTo DialNext
GoodReturn:
AtWrite 38 $LINE 031 "Completed "
Assign 0 ""
GoTo DialNext
Done:
AtWrite 12 15 031 " Dialing complete. Returning to DOS. "
Delay 5000
TimeOut 5 Done1
Done1:
Send "ATV1^M"
WaitFor "OK"
System Y
NoSuchNumber:
AtWrite 38 $LINE 016 "No Connection "
AtWrite 12 15 252 " Error - Unable to connect with $0. "
Stamp Error - Unable to connect with $0.
Gosub Error
Assign 0 ""
GoTo DialNext
AbortDial:
AtWrite 38 $LINE 016 "Too Many Tries"
AtWrite 12 15 252 " Error - Too many retires with $0. "
Stamp Error - Too many retries with $0.
Gosub Error
Assign 0 ""
GoTo DialNext
AbortTime:
AtWrite 12 15 031 " Dialing time has expired. Returning to DOS. "
Stamp Dialing halted. Dialing time has expired.
Delay 5000
TimeOut 5 Done1
Done1:
Send "ATV1^M"
WaitFor "OK"
System Y